package main

import (
	"fmt"
	"goclearfile/config"
	"goclearfile/controller"
	"gopkg.in/ini.v1"
	"os"
)

//go clear file

var (
	cfg = new(config.AppConf)
)

func main(){
	//加载配置文件
	err := ini.MapTo(cfg, "./config/config.ini");if err != nil {
		fmt.Printf("Fail to read file: %v", err)
		os.Exit(1)
	}

	//清理文件
	controller.ClearFile(cfg.FilePathConf.FilePath,cfg.GroupDirName,cfg.TaskNum)
}
